﻿@model PagedList.IPagedList<MSDAL.Log>
@using PagedList.Mvc;

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Strona błędów</h2>

<table class="table">
    <tr>
        <th>
            Id:
        </th>
        <th>
            Data:
        </th>
        <th>
            Thread:
        </th>
        <th>
            Level:
        </th>
        <th>
            Logger:
        </th>
        <th>
            Message:
        </th>
        <th>
            Exception:
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Id)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Date)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Thread)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Level)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Logger)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Message)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Exception)
            </td>
        </tr>
    }

</table>Strona @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) z @Model.PageCount

@Html.PagedListPager(Model, page => Url.Action("Index",
    new { page, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter }))

